import request from '@/utils/request'

// 纵向项目导出接口
export function getExportData(data) {
  return request({
    url: '/porproject_registration/exportPorProject',
    method: 'post',
    data
  })
}

// 纵向项目分页查询接口
export function getUserVerticals(data) {
  return request({
    url: '/porproject_registration/userGetProjects',
    method: 'post',
    data
  })
}

export function thesis_add(data) {
  return request({
    url: '/porproject_registration/AddZXProject',
    method: 'post',
    data
  })
}

export function thesis_add2(data) {
  return request({
    url: '/porproject_registration/UpdateZXProject',
    method: 'post',
    data
  })
}

export function thesis_delete(pregistrationID) {
  return request({
    url: '/porproject_registration/DeleteZXProject',
    method: 'get',
    params: { pregistrationID }
  })
}

export function thesis_commit1(tranprojectID) {
  return request({
    url: '/porproject_registration/CommitZXProject',
    method: 'get',
    params: { tranprojectID }
  })
}

export function thesis_commit2(tranprojectID) {
  return request({
    url: '/porproject_registration/CommitFinishZXProject',
    method: 'get',
    params: { tranprojectID }
  })
}

// 撤回纵向项目
export function thesis_withdraw(porprojectID) {
  return request({
    url: '/porproject_registration/WithdrawZXProject',
    method: 'get',
    params: { porprojectID }
  })
}

export function get_thesis_author(id) {
  return request({
    url: '/porprojectauthor/selectauthor',
    method: 'get',
    params: { id }
  })
}

export function thesis_author_add(data) {
  return request({
    url: '/porprojectauthor/addauthor',
    method: 'post',
    data
  })
}

export function thesis_author_edit(data) {
  return request({
    url: '/porprojectauthor/updateauthor',
    method: 'post',
    data
  })
}

export function thesis_author_delete(id) {
  return request({
    url: '/porprojectauthor/deleteauthor',
    method: 'get',
    params: { id }
  })
}

export function get_thesis_DZfunds(tranID) {
  return request({
    url: '/DZzxfunds/GetDzfundsByPorprojectID',
    method: 'get',
    params: { tranID }
  })
}

export function thesis_DZfunds_add(data) {
  return request({
    url: '/DZzxfunds/addDZfunds',
    method: 'post',
    data
  })
}

export function thesis_DZfunds_edit(data) {
  return request({
    url: '/DZzxfunds/UpdateDZfunds',
    method: 'post',
    data
  })
}

export function thesis_DZfunds_delete(id) {
  return request({
    url: '/DZzxfunds/removeDZfunds',
    method: 'get',
    params: { id }
  })
}

export function get_thesis_ZCfunds(tranID) {
  return request({
    url: '/ZCzxfunds/GetZCfundsByTranprojectID',
    method: 'get',
    params: { tranID }
  })
}

export function thesis_ZCfunds_add(data) {
  return request({
    url: '/ZCzxfunds/addZCfunds',
    method: 'post',
    data
  })
}

export function thesis_ZCfunds_edit(data) {
  return request({
    url: '/ZCzxfunds/UpdateZCfunds',
    method: 'post',
    data
  })
}

export function thesis_ZCfunds_delete(id) {
  return request({
    url: '/ZCzxfunds/removeZCfunds',
    method: 'get',
    params: { id }
  })
}

// 校级审核
export function get_thesis_xiaoji(data) {
  return request({
    url: '/porproject_registration/SchoolUserGetZXProjectS',
    method: 'post',
    data
  })
}
// 申请审核
export function thesis_pass_xiaoji1(tranprojectID) {
  return request({
    url: '/tranproject_registration/SchoolPassHxProject',
    method: 'get',
    params: { tranprojectID }
  })
}

export function thesis_back_xiaoji1(data) {
  return request({
    url: '/tranproject_registration/SchoolBackHxProject',
    method: 'post',
    data
  })
}
// 在研审核
export function thesis_pass_xiaoji2(tranprojectID) {
  return request({
    url: '/porproject_registration/SchoolPassZXProject',
    method: 'get',
    params: { tranprojectID }
  })
}

export function thesis_back_xiaoji2(data) {
  return request({
    url: '/porproject_registration/SchoolBackZXProject',
    method: 'post',
    data
  })
}
// 结题审核
export function thesis_pass_xiaoji3(tranprojectID) {
  return request({
    url: '/porproject_registration/SchoolFinishPassZXProject',
    method: 'get',
    params: { tranprojectID }
  })
}

export function thesis_back_xiaoji3(data) {
  return request({
    url: '/porproject_registration/SchooFinishlBackZXProject',
    method: 'post',
    data
  })
}

// 院级审核
// 项目在研-院级通过
export function thesis_pass_yuanji2(tranprojectID) {
  return request({
    url: '/porproject_registration/CollegePassZXProject',
    method: 'get',
    params: { tranprojectID }
  })
}

// 项目在研-院级退回
export function thesis_back_yuanji2(data) {
  return request({
    url: '/porproject_registration/CollegeBackZXProject',
    method: 'post',
    data
  })
}

// 项目结题-院级通过
export function thesis_pass_yuanji3(tranprojectID) {
  return request({
    url: '/porproject_registration/CollegeFinishPassZXProject',
    method: 'get',
    params: { tranprojectID }
  })
}

// 项目结题-院级退回
export function thesis_back_yuanji3(data) {
  return request({
    url: '/porproject_registration/CollegeFinishBackZXProject',
    method: 'post',
    data
  })
}

// 获取所有列表
export function get_all1(data) {
  return request({
    url: '/tranproject_registration/GetHxProjectStudying',
    method: 'post',
    data
  })
}

export function get_all2(data) {
  return request({
    url: '/tranproject_registration/GetHxProjectSuccess',
    method: 'post',
    data
  })
}

// 附件
export function file_add(data) {
  return request({
    url: '/porproject_registration/addZXprojectfile',
    method: 'post',
    data
  })
}

export function get_file(id) {
  return request({
    url: '/porproject_registration/pageZXprojectfileCondition',
    method: 'get',
    params: { id }
  })
}

export function file_delete(id) {
  return request({
    url: '/porproject_registration/DeleteZXprojectfile',
    method: 'get',
    params: { id }
  })
}

// 量化
export function getCascadingData(params) {
  return request({
    url: '/projecttype/getPorCascadingData',
    method: 'get',
    params
  })
}

export function getQulification(ProjectID) {
  return request({
    url: '/projectqulification/getProjectQulification',
    method: 'get',
    params: { ProjectID }
  })
}

export function deleteQulification(ID) {
  return request({
    url: '/projectqulification/deleteProjectQulification',
    method: 'get',
    params: { ID }
  })
}

export function addQulification(data) {
  return request({
    url: '/projectqulification/addProjectQulification',
    method: 'post',
    data
  })
}

export function GetById(projectID) {
  return request({
    url: '/porproject_registration/GetZXProjectById',
    method: 'get',
    params: { projectID }
  })
}

export function GetZxProjectDTOById(projectID) {
  return request({
    url: '/porproject_registration/GetZxProjectDTOById',
    method: 'get',
    params: { projectID }
  })
}

// 成果应用行业领域级联选项
export function getNationalEconomyData(params) {
  return request({
    url: '/national-economy/getAll',
    method: 'get',
    params
  })
}
export function getUnitData(params) {
  return request({
    url: '/dept/getDepts',
    method: 'get',
    params
  })
}
